home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume10 / contool / part03 < prev    next >
Encoding:
Internet Message Format  |  1990-10-29  |  47.3 KB

  1. Path: uunet!cs.utexas.edu!sun-barr!newstop!sun!melmac.harris-atd.com
  2. From: chuck@melmac.harris-atd.com (Chuck Musciano)
  3. Newsgroups: comp.sources.x
  4. Subject: v10i036: contool -- replacement for 'cmdtool -C', Part03/06
  5. Message-ID: <144344@sun.Eng.Sun.COM>
  6. Date: 30 Oct 90 06:26:10 GMT
  7. References: <csx-10i034:contool@uunet.UU.NET>
  8. Sender: news@sun.Eng.Sun.COM
  9. Lines: 928
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: chuck@melmac.harris-atd.com (Chuck Musciano)
  13. news@trantor.harris-atd.com (News stuff)
  14. Posting-number: Volume 10, Issue 36
  15. Archive-name: contool/part03
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 3 (of 6)."
  24. # Contents:  contool.info contool.man props.c
  25. # Wrapped by chuck@melmac on Fri Aug 17 10:00:52 1990
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'contool.info' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'contool.info'\"
  29. else
  30. echo shar: Extracting \"'contool.info'\" \(18660 characters\)
  31. sed "s/^X//" >'contool.info' <<'END_OF_FILE'
  32. X# 
  33. X# contool.info - User interface object help text.
  34. X# This file was generated by `gxv' from `contool.G'.
  35. X# DO NOT EDIT BY HAND.
  36. X# 
  37. X:contool_controls
  38. XThe contool control panel has buttons which let you load and store configuration data, adjust contool's configuration, and create and modify message filters.  Point at the desired button and press the Help key for more information about that set of functions.
  39. X# 
  40. X:file
  41. XThe File button provides various file-related services to contool users.  The associated menu has five entries.
  42. X
  43. X"Load Configuration" brings up the Load Configuration dialog.
  44. X
  45. X"Store Configuration" brings up the Store Configuration dialog.
  46. X
  47. X"Start Logging" starts logging messages to the log file specified in the Properties dialog.  If logging is already in effect, this menu item is disabled.
  48. X
  49. X"Stop Logging" stops logging.  If logging is not in effect, this menu item is disabled.
  50. X
  51. X"Print" prints the contents of the console use the print filter specified in the Properties dialog. 
  52. X
  53. XThe default action is "Load Configuration".
  54. X# 
  55. X:view
  56. XThe View button provides three contool support functions:
  57. X
  58. X"Become Console" ensures that contool has the system console attribute.  Only one process under SunOS can own the console.  If some other process acquires this attribute, messages will no longer be routed to contool.  This selection will give the console attribute back to contool.
  59. X
  60. X"Clear Messages" clears the current console messages from the scrolling display.
  61. X
  62. X"Reset Filter" causes contool to stop processing a multi-line filter.  If the user has incorrectly specified the end pattern of a multi-line filter, contool may never stop processing that filter, preventing subsequent messages from being displayed.  This sleection cancels any multi-line fiter in effect.  If a multi-line filter is being processed, its starting pattern will be displayed in the left footer of the contool window.
  63. X
  64. XThe default selection is "Become Console".
  65. X# 
  66. X:edit
  67. XThe Edit button lets the user edit either the contool properties or the current filter set.
  68. X
  69. XThe "Filters" selection brings up the Filters dialog.
  70. X
  71. XThe "Properties" selection brings up the Properties dialog.
  72. X
  73. XThe default selection is "Filters".
  74. X# 
  75. X:display
  76. XThe contool console display contains the text of those messages which contoolhas been configured to display.  Some messages may be timestamped.  Which messages make it into the console is controlled by the Filters dialog; how many messages are retained is determined by the Properties dialog.
  77. X# 
  78. X:prop_controls
  79. XThe Properties dialog box lets you modify various default attributes of contool.  These attributes include how to handle messages which do not match any filter, message logging and printing, and icon images.
  80. X# 
  81. X:default_action
  82. XThe Default action setting determines what action contool will take when a message arrives that does not match any filter.
  83. X
  84. XIf "Beep" is selected, the machine bell will be rung the indicated number of times.
  85. X
  86. XIf "Command" is selected, the indicated command will be executed.  The contents of the message are written to the command's standard input.
  87. X
  88. XIf "Flash icon" is selected, contool's icon will flash, alternating between the "Check console" and "Flash" images specified in the contool Properties dialog box.
  89. X
  90. XIf "Open window" is selected, contool will open to a window (if iconic) and move in front of any obscuring windows.
  91. X
  92. XIf "Timestamp" is selected, a timestamp will be written to the console before the message text.  Timestamping is further controlled by the timestamp resolution defined in the contool Properties dialog box.
  93. X
  94. X# 
  95. X:default_beep_count
  96. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives that does not match any filter.
  97. X
  98. XThis item is only enabled if "Beep" is enabled in the "Default action" setting.
  99. X# 
  100. X:default_beep_times
  101. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives that does not match any filter.
  102. X
  103. XThis item is only enabled if "Beep" is enabled in the "Default action" setting.
  104. X# 
  105. X:default_command
  106. XThis text field determines the command that will be exedcuted when a message arrives that does not match any filter.  The contents of the message are written to standard input of the executing command.
  107. X
  108. XThis item is only enabled if "Command" is enabled in the "Default action" setting.
  109. X# 
  110. X:log_file
  111. XThe Log file text field contains the path of the file to which messages are written if logging is enabled.
  112. X
  113. XMessages are always appended to the file, preserving any previous contents.
  114. X
  115. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  116. X# 
  117. X:log_style
  118. XThe Log messages setting determines whether messages will be written to the log before or after filtering.
  119. X
  120. XIf "Before filtering" is selected, everything received by contool is written to the log.
  121. X
  122. XIf "After filtering" is selected, only those messages that do not match any filter, or that match a filter whose match action is to save the message, are written to the log.
  123. X# 
  124. X:print_filter
  125. XThe Print filter text field specifies the command which will be used to print the console when "Print" is selected from the contool "File" menu.
  126. X
  127. XThis command should route its standard input to a printer.
  128. X# 
  129. X:good_icon
  130. XThe "All is well" icon text field should contain the path of a file containing the image to be used by contool when it is not flashing its icon.  The image should have been produced using iconedit(1).
  131. X
  132. XIf this field is blank, the default icon is used.
  133. X# 
  134. X:bad_icon
  135. XThe "Check console" icon text field should contain the path of a file containing the image to be used by contool when it is flashing its icon.  The image should have been produced using iconedit(1).  The image will be alternated with the "Flash" image to produce a blinking effect.
  136. X
  137. XIf this field is blank, the default icon is used.
  138. X# 
  139. X:flash_icon
  140. XThe "Flash" icon text field should contain the path of a file containing the image to be used by contool when it is flashing its icon.  The image should have been produced using iconedit(1).  The image will be alternated with the "Check console" image to produce a blinking effect.
  141. X
  142. XIf this field is blank, the default icon is used.
  143. X# 
  144. X:stamp_resolution
  145. XThe Timestamp resolution numeric text item specifies the number of seconds that must elapse before contool will write a new timestamp to the console.  Even if a filter requires that a timestamp be written, the stamp will only be inserted if the specified time has transpired.  This keeps the console from becoming clogged with a large number of similar timestamps.
  146. X# 
  147. X:message2
  148. XThe Timestamp resolution numeric text item specifies the number of seconds that must elapse before contool will write a new timestamp to the console.  Even if a filter requires that a timestamp be written, the stamp will only be inserted if the specified time has transpired.  This keeps the console from becoming clogged with a large number of similar timestamps.
  149. X# 
  150. X:max_message
  151. XThe Maximum message text numeric field determines the maximum number of characters contool will keep in the console display.  If inserting a new message would exceed this amount, contool will remove text from the beginning fo the display to make room.  The amount of text removed is determined by the "Overflow deletion amount" value.
  152. X# 
  153. X:message3
  154. XThe Maximum message text numeric field determines the maximum number of characters contool will keep in the console display.  If inserting a new message would exceed this amount, contool will remove text from the beginning fo the display to make room.  The amount of text removed is determined by the "Overflow deletion amount" value.
  155. X# 
  156. X:delete_amount
  157. XThe Overflow deletion amount numeric field determines how much text will be removed from the start of the console to make room for a new message whose insertion would cause the console the exceed the "Maximum message text" size.
  158. X
  159. XContool will attempt to remove whole messages from the console in order to retain an orderly appearance.
  160. X# 
  161. X:message4
  162. XThe Overflow deletion amount numeric field determines how much text will be removed from the start of the console to make room for a new message whose insertion would cause the console the exceed the "Maximum message text" size.
  163. X
  164. XContool will attempt to remove whole messages from the console in order to retain an orderly appearance.
  165. X# 
  166. X:props_apply
  167. XThe Apply button causes the values displayed in the Properties dialog to become the current contool properties.  Before Apply is pressed, changes made in this dialog do not affect contool.
  168. X
  169. XEven after pressing Apply, the changes are not written to the contool configuration file.  If you wish your changes to remaina cross invocations of contool, use the "Save Configuration" dialog to write the properties to the configuration file.
  170. X# 
  171. X:props_reset
  172. XThe Reset button restores the values in the Properties dialog to match the current values in use by contool.  Any changes made to these values and not applied to contool are discarded.
  173. X# 
  174. X:filter_controls
  175. XThis is the contool filter editing dialog.  You use this dialog to add, delete, and modify console message filters.
  176. X# 
  177. X:filter_list
  178. XThis scrolling list displays the current contool filter set.  Each line corresponds to one filter.
  179. X
  180. XThe starting pattern for each filter is shown in the list, preceded by a small glyph which indicates whether the filter is a single-line or multi-line filter.
  181. X
  182. XTo see the other attributes of a single filter, select that filter with the mouse.  The attributes will be displayed in the Filter dialog box.
  183. X
  184. XIf you select more than one filter, the remainder of the dialog box will be grayed out.  The dialog box is also disabled if no filter is selected.
  185. X# 
  186. X:filter_insert
  187. XThe Insert button inserts a new, blank filter into the filter list.  The menu associated with the button allows you to specify where the new filter will be inserted.
  188. X
  189. XThe insert positions are at the top of the list, the bottom of the list, and before or after the current selection.  These last choices are only enabled if exactly one filter in the list is selected.  The default position is at the bottom of the list.
  190. X
  191. XAfter inserting the new filter, any other selected filters are deselected, and the new filter is selected.  You can then define the attributes of this new filter, and update the filter using the Update button.
  192. X# 
  193. X:filter_edit
  194. XThe Edit button lets you modify the current filter list.  The menu associated with this button provides Cut, Copy, Paste, and Delete operations.
  195. X
  196. XThe Cut operation removes the selected filters from the list and places them on the clipboard.  You can place these filters back into the list using the Paste operation.
  197. X
  198. XThe Copy operation places a copy of the selected filters onto the clipboard.  The Paste operation will paste the copied filters into the list.
  199. X
  200. XThe Paste operation pastes filters on the clipboard into the filter list.  The Paste submenu provides four posting positions: at the top of the list, the bottom of the list, and before or after the current selection.  The last two choices are only enabled if exactly one filter in the list is selected.  The default position is at the bottom of the list.
  201. X
  202. XThe Delete operation removes the selected filters from the list.  The filters are not placed on the clipboard.  Once deleted, filters cannot be recovered with the Paste operation.
  203. X
  204. XThe Cut, Copy, and Delete operations are only enabled when one or more filters in the list are selected.  The Paste operation is only enabled after a Cut or Copy operation has placed filters on the clipboard.
  205. X
  206. XThe default edit operation is Cut.
  207. X# 
  208. X:filter_update
  209. XThe Update button applies the current filter attributes displayed in the Filters dialog box to the currently selected filter.  The only way to modify a filter is to select it, change its attributes, and click the Update button.
  210. X
  211. XThe Update button is only enabled when exactly one filter in the list is selected.
  212. X
  213. XYou must use Update to make changes to a filter take effect.  Clciking the Apply button does not perform an Update function on the current filter.
  214. X# 
  215. X:filter_type
  216. XThe Type setting determines whether the currently selected filter will match one or several lines of text written to the console.
  217. X
  218. XIf "Single line filter" is selected, the "Pattern" text field is enabled, and must contain a regular expression describing the line of text to be matched by this filter.
  219. X
  220. XIf "Multi-line filter" is selected, both "Pattern" and "End pattern" are enabled.  The "Pattern" field should contain a pattern which will match the first line of a multi-line filter.  The "End pattern" must match the last line of the multi-line filter.  All text between the first and last lines is considered part of the filtered text.
  221. X# 
  222. X:start
  223. XThe Pattern text field contains a regular expression (see ed(1), for more on regular expressions) which will match the first line of a message written to the console.  For single line filters, this is the only line matched by the filter.  For multi-line filters, lines of text beginning with the first line and continuing until a line matches the "End pattern" are considered part of the filtered text.
  224. X# 
  225. X:stop
  226. XThe End pattern text field contains a regular expression (see ed(1) for more on regular expressions) which will match the last line of a multi-line filter.
  227. X# 
  228. X:comment
  229. XThe Comment text field should contain a short description of what the current filter does.  Since some filters can be quite arcane, this description can be helpful to new users.
  230. X
  231. XThis field is optional, and can be left empty.  Let your conscience be your guide...
  232. X# 
  233. X:ignore
  234. XThe When matched selection determines what contool does with a message once it has matched a filter.
  235. X
  236. XIf "Save message" is selected, the actions selected in the "When saved" setting are performed, and the message text is written to the  console.
  237. X
  238. XIf "Ignore message" is selected, "When saved" is disabled and the message text is discarded.
  239. X# 
  240. X:action
  241. XThe When saved setting determines what action contool will take when a particular filter matches a console message.
  242. X
  243. XIf "Beep" is selected, the machine bell will be rung the indicated number of times.
  244. X
  245. XIf "Command" is selected, the indicated command will be executed.  The contents of the message are written to the command's standard input.
  246. X
  247. XIf "Flash icon" is selected, contool's icon will flash, alternating between the "Check console" and "Flash" images specified in the contool Properties dialog box.
  248. X
  249. XIf "Open window" is selected, contool will open to a window (if iconic) and move in front of any obscuring windows.
  250. X
  251. XIf "Timestamp" is selected, a timestamp will be written to the console before the message text.  Timestamping is further controlled by the timestamp resolution defined in the contool Properties dialog box.
  252. X
  253. XWhen a new filter is created, the save actions are set to match the default message actions defined in the Properties dialog box.
  254. X# 
  255. X:filter_beep_count
  256. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives matching the current filter.
  257. X
  258. XThis item is only enabled if "When matched" is set to "Save message" and "Beep" is enabled in the "When saved" setting.
  259. X# 
  260. X:filter_beep_times
  261. XThis numeric text field determines the number of times the terminal bell will be rung when a message arrives matching the current filter.
  262. X
  263. XThis item is only enabled if "When matched" is set to "Save message" and "Beep" is enabled in the "When saved" setting.
  264. X# 
  265. X:filter_command
  266. XThis text field determines the command that will be exedcuted when a message arrives matching the current filter.  The contents of the message are written to standard input of the executing command.
  267. X
  268. XThis item is only enabled if "When matched" is set to "Save message" and "Command" is enabled in the "When saved" setting.
  269. X# 
  270. X:filters_apply
  271. XThe Apply button takes the set of filters displayed in the filter list and makes them the current contool filter set.  Before Apply is pressed, any additions, deletions, or changes made to the filters remain local to the Filters dialog box.
  272. X
  273. XEven after pressing Apply, the filter changes are not written to the configuration file.  In roder to make your changes take effect for subsequent invocations of contool, use the Save Configuration dialog box to write them to your configuration file.
  274. X# 
  275. X:filters_reset
  276. XThe Reset button discards any changes you have made to the displayed filter set, restoring the filters to match the set currently in use by contool.
  277. X
  278. XChanges made to the filters are local to the Filters dialog box.  You can discard your work and start fresh with the existing filter set by pressing the Reset button.
  279. X# 
  280. X:load_controls
  281. XThe Load Configuration dialog lets the user load tool properties and/or filter definitions from a configuration file.
  282. X# 
  283. X:load_type
  284. XThe Load selection lets the user choose which items are to be loaded from the configuration file.
  285. X
  286. XIf "Tool properties" is selected, contool properties will be loaded from the file.
  287. X
  288. XIf "Filter definitions" is selected, new filters will be loaded from the file, replacing any existing filters.
  289. X# 
  290. X:load_file
  291. XThe Configuration file text field must contain the name of the desired configuration file.
  292. X
  293. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  294. X# 
  295. X:accept_load
  296. XThe Load button causes the selected items to be read from the configuration file.  Existing properties and/or filters are replaced by those read from the file.
  297. X# 
  298. X:store_controls
  299. XThe Store Configuration dialog lets the user store tool properties and/or filter definitions in a configuration file.
  300. X# 
  301. X:store_type
  302. XThe Store selection lets the user choose which items are to be stored in the configuration file.
  303. X
  304. XIf "Tool properties" is selected, contool properties will be written to the file.
  305. X
  306. XIf "Filter definitions" is selected, new filters will be written to the file.
  307. X# 
  308. X:store_file
  309. XThe Configuration file text field must contain the name of the desired configuration file.
  310. X
  311. XTyping a space in this field will cause file name completion to occur, expanding the current pathname to match, as much as possible, any existing files with the same name.
  312. X# 
  313. X:accept_store
  314. XThe Store button writes the desired items to the configuration file.  The entire file is overwritten with the data.  Thus, a file containing properties and filters will be completely rewritten, even if you only write the filters to it.
  315. END_OF_FILE
  316. if test 18660 -ne `wc -c <'contool.info'`; then
  317.     echo shar: \"'contool.info'\" unpacked with wrong size!
  318. fi
  319. # end of 'contool.info'
  320. fi
  321. if test -f 'contool.man' -a "${1}" != "-c" ; then 
  322.   echo shar: Will not clobber existing file \"'contool.man'\"
  323. else
  324. echo shar: Extracting \"'contool.man'\" \(17253 characters\)
  325. sed "s/^X//" >'contool.man' <<'END_OF_FILE'
  326. X.TH CONTOOL 1 "13 October 1989"
  327. X.SH NAME
  328. Xcontool \- capture and display console output
  329. X.SH SYNOPSIS
  330. Xcontool [\fB\(hyf\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP]
  331. X.SH DESCRIPTION
  332. X.LP
  333. X\f2Contool\fP captures and displays any messages sent to the system console.
  334. XEach message is timestamped as it arrives.  The messages are displayed in a
  335. Xscrolling text window, so the user can scroll through old messages.
  336. X.LP
  337. XWhen a message arrives, \f3contool\fP will beep and, if closed, begin
  338. Xblinking its icon until the user opens the tool.  This behavior can be changed
  339. Xby modifying the default contool properties.
  340. X.LP
  341. X\f2Contool\fP must be run under either Open Windows or X Windows.
  342. XIt accepts the standard Open Windows command line options.
  343. X.SH OPTIONS
  344. X.IP "\fB\\(hyf\fP \fIfile\fP"
  345. Xspecifies an alternate configuration file.  \f2Contool\fP normally
  346. Xreads its configuration information from ~/.contool.
  347. X.IP "\fB\\(hyl\fP"
  348. Xenables logging when \f2contool\fP starts.  Initially, \f2contool\fP
  349. Xdoes not log messages to a file.  This option allows logging to be started
  350. Xautomatically.  Logging behavior can be enabled and disabled via the
  351. X\*(lqFile\*(rq menu (see below).
  352. X.IP "\fB\\(hyL\fP \fIlogfile\fP"
  353. Xspecifies an alternate log file.  The value of \fIlogfile\fP overrides
  354. Xany log file stored in the configuration file.  The \fB-l\fP and \fB-L\fP
  355. Xoptions used together allow multiple copies of contool to be started on 
  356. Xa single machine, with each copy logging to a different file, without
  357. Xhaving to create and maintain multiple configuration files.
  358. X.SH USER INTERFACE
  359. X.LP
  360. X\f2Contool\fP presents the user with a control panel containing three
  361. Xbuttons and a scrolling text window.  Console messages appear in the
  362. Xtext window; \f2contool\fP's behavior is managed with the \fBFile\fP,
  363. X\fBView\fP, and \fBEdit\fP buttons.  These buttons have several menu choices
  364. Xassociated with them:
  365. X.IP "\fBFile: Load Configuration...\fP"
  366. Xbrings up the \fBLoad Configuration\fP dialog box.  This dialog contains
  367. Xa non-exclusive setting, a text field, and a single \fBLoad\fP button.
  368. XThe setting has two entries: \*(lqTool Properties\*(rq and \*(lqFilter
  369. XDefinitions\*(rq.  The user can choose which of these items to load from
  370. Xthe configuration file.  The default action is to load both properties and
  371. Xfilters from the file.
  372. X.IP ""
  373. XThe text field contains the path of the configuration file.  By default,
  374. Xthis is either ~/.contool, or the value of the \fB-f\fP option (above).
  375. XThis text field provides file name completion, like \f2csh\fP(1), by typing
  376. Xa space or carriage return.
  377. X.IP ""
  378. XAfter determining which components to be read from the file, and the name of
  379. Xthe file, clicking on the \fBLoad\fP button will cause the desired elements
  380. Xto be read from the file.  If filters are loaded, any existing filters are
  381. Xdiscarded.  If \f2contool\fP was in the middle of filtering a multi-line message,
  382. Xthat filtering action is terminated.
  383. X.IP ""
  384. X\f2Contool\fP can read files created by versions 2.0, 2.1, 2.2, and 3.0 of
  385. X\f2contool\fP.  Files used by version 1.0 will need to be manually converted
  386. Xby first reading and writing them with any 2.x release of \f2contool\fP.
  387. X.IP "\fBFile: Save Configuration...\fP"
  388. Xis analogous to the \fBLoad Configuration\fP operation, bringing up a dialog
  389. Xbox containing a non-exclusive setting, a text field, and a \fBSave\fP
  390. Xbutton.  In the same manner as the \fBLoad Configuration\fP dialog, the
  391. Xuser indiactes which items he desires to save, specifies the destination
  392. Xfile, and clicks on the \fBSave\fP button to save the information.
  393. X.IP ""
  394. X\f2Contool\fP writes the data in a format incompatible with previous
  395. Xversions (release 2.2 or earlier) of the tool.
  396. X.IP "\fBFile: Start Logging\fP"
  397. Xstarts logging console messages to the log file specified by the tool
  398. Xproperties, or the \fB-L\fP option (above).  The tool properties also
  399. Xcontains a switch which determines whether messages are written before
  400. Xor after filtering occurs.  If before, all messages are logged.  If after,
  401. Xonly those messages which do not match a filter, or whose filter has the
  402. X\*(lqSave\*(rq attribute, are logged.
  403. X.IP ""
  404. XThe log file is written in such a manner that multiple invocations of
  405. X\f2contool\fP can write to the same log file without conflict.  New 
  406. Xmessages are always appended to the log file.
  407. X.IP "\fBFile: Stop Logging\fP"
  408. Xstops the logging process.
  409. X.IP "\fBFile: Print\fP"
  410. Xuses the \*(lqPrint Filter\*(rq specified in the tool properties to 
  411. Xprint the contents of the console.  Only messages saved in the console
  412. Xcan be printed.
  413. X.IP "\fBView: Become Console\fP"
  414. Xensures that \f2contool\fP has the system console attribute.  SunOS
  415. Xallows exactly one process in the system to own the console.  If some
  416. Xother process takes control of the console, the user can reassign the
  417. Xconsole attribute to \f2contool\fP using this menu selection.
  418. X.IP "\fBView: Clear Messages\fP"
  419. Xclears all messages from the console text display.
  420. X.IP "\fBView: Reset Filter\fP"
  421. Xinterrupts filtering of a multi-line filter.  If the user incorrectly
  422. Xspecifies the end pattern of a multi-line filter, \f2contool\fP may
  423. Xnever stop processing the filter, causing all subsequent console
  424. Xmessages to be incorrectly handled.  This selection resets the effect
  425. Xof any multi-line filter that may be in effect.
  426. X.IP ""
  427. XWhen processing a multi-line filter, \f2contool\fP displays the
  428. Xstarting filter pattern in the left window footer.  If the left footer
  429. Xis blank, \f2contool\fP is not processing a multi-line filter.
  430. X.IP "\fBEdit: Filters...\fP"
  431. Xbrings up the \fBFilters\fP dialog box.  See EDITING FILTERS, below.
  432. X.IP "\fBEdit: Properties...\fP"
  433. Xbrings up the \fBTool Properties\fP dialog box.  See TOOL PROPERTIES, below.
  434. X.SH EDITING FILTERS
  435. XThe \fBFilters\fP dialog presents a scrolling list of filters and a variety of
  436. Xdevices used to modify the current filter set.  The items in this dialog are:
  437. X.IP "\fBFilters\fP"
  438. XThis scrolling list shows the starting pattern of each filter currently used by
  439. X\f2contool\fP.  The pattern text is preceded by a small glyph indicating
  440. Xwhether the filter is a single-line or multi-line filter.
  441. X.IP ""
  442. XIf exactly one item in the list is selected, the properties of that filter
  443. Xwill be displayed in the dialog box.  If no, or more than one, filter is
  444. Xselected, the remainder of the dialog box is grayed out.
  445. X.IP "\fBInsert\fP"
  446. XThis button inserts a new blank filter into the scrolling list, allowing
  447. Xthe user to add new filters to the filter set.  A menu attached to
  448. Xthe button allows the user to select the insert point: at the top of the
  449. Xlist, before the current selection, after the current selection, or at
  450. Xthe bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  451. Xchoices are only enabled if exactly one filter in the list is selected.
  452. XThe default position is the bottom of the list.
  453. X.IP "\fBEdit\fP"
  454. XThis button edits the currently selected filters in the list.  The
  455. Xmenu attached to this button has four choices: \fBCut\fP, \fBCopy\fP, \fBPaste\fP,
  456. Xand \fBDelete\fP.
  457. X.IP ""
  458. XThe \fBCut\fP operation removes the selected filters from the list
  459. Xand places them on the clipboard, where they can subsequently be pasted
  460. Xback into the list.
  461. X.IP ""
  462. XThe \fBCopy\fP operation copies the selected filters to the clipboard.
  463. XThe filters are not removed from the list.  The copied filters can subsequently
  464. Xbe pasted back into the list.
  465. X.IP ""
  466. XThe \fBPaste\fP operation copies filters from the clipboard into the list.
  467. XThis selection has a menu which specifies the paste position: at the top of the
  468. Xlist, before the current selection, after the current selection, or at
  469. Xthe bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  470. Xchoices are only enabled if exactly one filter in the list is selected.
  471. XThe default position is the bottom of the list.
  472. X.IP ""
  473. XThe \fBDelete\fP operation removes the selected filters from the list
  474. Xwithout placing them on the clipboard.  Once deleted, filters cannot
  475. Xbe recovered with a paste operation.
  476. X.IP ""
  477. XThe \fBCut\fP, \fBCopy\fP, and \fBDelete\fP selections are only presented
  478. Xif one or more filters in the list are selected.  The \fBPaste\fP selection
  479. Xis only available after a \fBCut\fP or \fBCopy\fP operation.
  480. X.IP "\fBUpdate\fP"
  481. XThis button updates the currently selected filter using the values 
  482. Xpresented in the remainder of the dialog box.  This button is only
  483. Xaccessible if exactly one filter in the list is selected.
  484. X.IP ""
  485. X\fBUpdate\fP is used to modify an existing filter.  When just that filter
  486. Xis selected, its attributes are placed into the other dialog elements
  487. Xdescribed below.  After adjusting the filter attributes, the user clicks
  488. Xthe \fBUpdate\fP button to apply the changes to the currently selected
  489. Xfilter.
  490. X.IP ""
  491. XIn a similar manner, \fBUpdate\fP is used to apply attributes to a new,
  492. Xblank filter placed in the list via the \fBInsert\fP button.
  493. X.IP "\fBType\fP"
  494. XThe \fBType\fP toggle indicates whether a filter will match just a single
  495. Xline message, or will match a multiple line message.  When \*(lqSingle
  496. Xline filter\*(rq is chosen, the \fBEnd pattern\fP item is disabled,
  497. Xand the user must specify the pattern which will match a single line of
  498. Xtext written to the console.  When \*(lqMulti-line filter\*(rq is
  499. Xselected, the \fBEnd pattern\fP item is enabled, and the user needs to specify
  500. Xboth a starting and an ending pattern.  All text following a line which
  501. Xmatches the starting pattern, up to and including a line which matches the
  502. Xending pattern, is considered to be part of the filtered message.
  503. X.IP "\fBPattern\fP"
  504. XThis text field specifies the regular expression which matches the first
  505. X(and, in the case of single line filters, the only) line of text in the
  506. Xfiltered message.  Any valid regular expression is permitted.  Users that
  507. Xare trying to match some text exactly should be aware that regular
  508. Xexpressions can match text anywhere in a line, and that the expression
  509. Xshould be anchored to the start (or end) of the line by using the "^"
  510. X(or "$") metacharacters.  For more information on regular expressions,
  511. Xsee \f2ed\fP(1).
  512. X.IP "\fBEnd pattern\fP"
  513. XIf the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field
  514. Xmust contain the regular expression which matches the last line of the
  515. Xblock of text handled by this filter.
  516. X.IP "\fBComment\fP"
  517. XThis text field contains any comments regarding the filter the user
  518. Xwishes to record.  Since some filters can be rather arcane, it is suggested
  519. Xthat users comment their filters.
  520. X.IP "\fBWhen matched\fP"
  521. XThis exclusive setting dictates the behavior of \f2contool\fP when a
  522. Xfilter is matched.  If \*(lqSave message\*(rq is chosen, the message
  523. Xis copied into the console display, and various actions can be taken.
  524. XIf \*(lqIgnore message\*(rq is selected, the filter text is discarded
  525. Xand no further actions are taken by \f2contool\fP.
  526. X.IP "\fBWhen saved\fP"
  527. XIf \fBWhen matched\fP is set to \*(lqSave message\*(rq, this non-exclusive
  528. Xchoice item will be enabled, allowing the user to specify what contool
  529. Xshould do with this message.
  530. X.IP ""
  531. XThe \*(lqBeep\*(rq choice causes the terminal bell to be sounded.  If
  532. Xselected, the beep counter to the right of this item is enabled, allowing
  533. Xthe user to choose anywhere from one brief beep up to 99 annoying beeps.
  534. X.IP ""
  535. XThe \*(lqCommand\*(rq choice causes a single command to be executed.
  536. XThe text field to the right of this item must contain the command to
  537. Xbe executed.  \f2Contool\fP will write the text of the message to the
  538. Xstandard input of the command.  For example, using \*(lqmail -s 'Contool
  539. Xoutput' user\*(rq as the command would mail the message text to the
  540. X\f2user\fP.
  541. X.IP ""
  542. XThe \*(lqFlash icon\*(rq choice causes the \f2contool\fP icon to flash,
  543. Xalternating between the \*(lqCheck console\*(rq and \*(lqFlash\*(rq
  544. Xicons.
  545. X.IP ""
  546. XThe \*(lqOpen window\*(rq choice causes \f2contool\fP to open from
  547. Xits iconic state, and to move in front of any obscuring windows.
  548. X.IP ""
  549. XThe \*(lqTimestamp\*(rq choice causes \f2contool\fP to write a timestamp
  550. Xto the console before copying the message into the console.  The timestamp
  551. Xis written in conjunction with the timestamp resolution specified in the
  552. X\fBTool Properties\fP dialog.
  553. X.IP "\fBApply\fP"
  554. XThis button makes the filters contained in the scrolling list the current
  555. Xset of active filters.  Until this button is clicked, all changes made to
  556. Xthe filters are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  557. Xthe changed filters become the current working set.
  558. X.IP ""
  559. XNote that even after clicking \fBAccept\fP, the configuration file is
  560. Xnot updated.  To make the changes permanent between invocations of
  561. X\f2contool\fP, use the \fBSave Configuration\fP dialog to save the
  562. Xchanged filters.
  563. X.IP "\fBReset\fP"
  564. XThis button discards any changes made to the current filter set, 
  565. Xrestoring the filter list to match the current filter set in use
  566. Xby \f2contool\fP.
  567. X.SH TOOL PROPERTIES
  568. XThe \fBTool Properties\fP dialog allows the user to change the default behavior
  569. Xof \f2contool\fP.  This includes various tool attributes, and the 
  570. Xactions taken when a message arrives which does not match any filter.
  571. XThe various properties include:
  572. X.IP "\fBDefault action\fP"
  573. XThis non-exclusive setting determines the actions taken by \f2contool\fP
  574. Xwhen a message arrives which does not match any filter.  The various
  575. Xchoices in this setting exactly correspond to the \fBWhen saved\fP
  576. Xsetting the \fBFilters\fP dialog, above.
  577. X.IP "\fBLog file\fP
  578. XThis text field contains the path of the file to which messages will
  579. Xbe logged.  This field must be filled in before logging is enabled.
  580. X.IP "\fBLog messages\fP"
  581. XIf this exclusive setting is set to \*(lqbefore filtering\*(rq, all
  582. Xmessages will be logged.  If set to \*(lqafter filtering\*(rq, 
  583. Xmessages that match filters whose \fBWhen matched\fP behavior is
  584. Xset to \*(lqIgnore message\*(rq will not be logged.
  585. X.IP "\fBPrint filter\fP"
  586. XThis text field specifies the command to be used to print the
  587. Xconsole.  The default is \*(lqlpr\*(rq.  Local site dependencies
  588. Xmay require a different command.
  589. X.IP "\fB\\*(lqAll is well\\*(rq icon\fP"
  590. XThis text field contains the path of a file created with \f2iconedit\fP(1).
  591. XThe contained image will be used as \f2contool\fP's regular icon image.
  592. XThis image is displayed whenever no flashing is in effect.
  593. X.IP "\fB\\*(lqCheck console\\*(rq icon\fP"
  594. XThis image is alternated with the \fB\*(lqFlash\*(rq icon\fP image whenever flashing
  595. Xis required.
  596. X.IP "\fB\\*(lqFlash\\*(rq icon\fP"
  597. XThis image is alternated with the \fB\*(lqCheck console\*(rq icon\fP image whenever flashing
  598. Xis required.  Ideally, all three icons should be the same size.
  599. X.IP "\fBTimestamp resolution\fP"
  600. XThis numeric field specifies the minimum number of seconds to wait before
  601. Xwriting a new timestamp to the console.  Messages which require timestamping
  602. Xwill only write a timestamp if this number of seconds have transpired since the
  603. Xlast timestamp.
  604. X.IP "\fBMaximum message text\fP"
  605. XThis numeric field determines the maximum size, in bytes, of messages that will
  606. Xbe stored in the console.  When writing a message to the console would exceed
  607. Xthis limit, some number of bytes, as determined by the \fBOverflow delete amount\fP,
  608. Xbelow, will be removed from the front of the console.  This feature prevents the
  609. Xconsole from becoming so large over time that it begins to swamp system resources.
  610. X.IP "\fBOverflow delete amount\fP"
  611. XWhen writing a message to the console would exceed the \fBMaximum message text\fP,
  612. Xabove, text will be deleted from the beginning of the console to make room.
  613. XThis numeric field specifies how many bytes to remove to make room.  \f2Contool\fP
  614. Xwill attempt to remove whole messages within the constraints of the console
  615. Xsize to preserve a readable console.
  616. X.IP "\fBApply\fP"
  617. XThis button makes the values in the dialog box the
  618. Xcurrent tool properties.  Until this button is clicked, all changes made to
  619. Xthe properties are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  620. Xthe changed values become the current properties.
  621. X.IP ""
  622. XNote that even after clicking \fBAccept\fP, the configuration file is
  623. Xnot updated.  To make the changes permanent between invocations of
  624. X\f2contool\fP, use the \fBSave Configuration\fP dialog to save the
  625. Xchanged properties.
  626. X.IP "\fBReset\fP"
  627. XThis button discards any changes in the dialog box made to the current properties, 
  628. Xrestoring the properties to match the current properties in use
  629. Xby \f2contool\fP.
  630. X.SH CONFIGURATION FILE FORMAT
  631. XPrevious versions of \f2contool\fP relied on the user editing the
  632. Xconfiguration file by hand.  This version manages the file automatically,
  633. Xand it is not intended that the file be edited directly by users.
  634. XSee EDITING FILTERS, above, for information on modifying the behavior
  635. Xof \f2contool\fP.
  636. X.SH FILES
  637. X.ta 2i
  638. X~/.contool    filter pattern file
  639. X.SH SEE ALSO
  640. Xcmdtool(1), ed(1)
  641. X.SH AUTHOR
  642. X.LP
  643. XChuck Musciano
  644. X.br
  645. XAdvanced Technology Department
  646. X.br
  647. XHarris Corporation
  648. X.br
  649. XPO Box 37, MS 3A/1912
  650. X.br
  651. XMelbourne, FL 32902
  652. X.br
  653. X(407) 727-6131
  654. X.br
  655. XARPA: chuck@trantor.harris-atd.com
  656. X.SH BUGS
  657. X.LP
  658. X\f2Contool\fP is a view-only tool, and there is no way to type commands
  659. Xon the console.
  660. X.LP
  661. XWindow system bugs may cause unusual, but harmless, quirks in the behavior
  662. Xof \f2contool\fP.  In particular, displaying a menu in a dialog box without
  663. Xactually selecting an item from that menu will cause the dialog box to close.
  664. END_OF_FILE
  665. if test 17253 -ne `wc -c <'contool.man'`; then
  666.     echo shar: \"'contool.man'\" unpacked with wrong size!
  667. fi
  668. # end of 'contool.man'
  669. fi
  670. if test -f 'props.c' -a "${1}" != "-c" ; then 
  671.   echo shar: Will not clobber existing file \"'props.c'\"
  672. else
  673. echo shar: Extracting \"'props.c'\" \(8606 characters\)
  674. sed "s/^X//" >'props.c' <<'END_OF_FILE'
  675. X/************************************************************************/
  676. X/*    Copyright 1988-1990 by Chuck Musciano and Harris Corporation    */
  677. X/*                                    */
  678. X/*    Permission to use, copy, modify, and distribute this software    */
  679. X/*    and its documentation for any purpose and without fee is    */
  680. X/*    hereby granted, provided that the above copyright notice    */
  681. X/*    appear in all copies and that both that copyright notice and    */
  682. X/*    this permission notice appear in supporting documentation, and    */
  683. X/*    that the name of Chuck Musciano and Harris Corporation not be    */
  684. X/*    used in advertising or publicity pertaining to distribution    */
  685. X/*    of the software without specific, written prior permission.    */
  686. X/*    Chuck Musciano and Harris Corporation make no representations    */
  687. X/*    about the suitability of this software for any purpose.  It is    */
  688. X/*    provided "as is" without express or implied warranty.  This     */
  689. X/*    software may not be sold without the prior explicit permission    */
  690. X/*    of Harris Corporation.                        */
  691. X/************************************************************************/
  692. X
  693. X/************************************************************************/
  694. X/*                                    */
  695. X/*    props.c        contool properties dialog manager        */
  696. X/*                                    */
  697. X/************************************************************************/
  698. X
  699. X#include    <stdio.h>
  700. X#include    <sys/param.h>
  701. X#include    <sys/types.h>
  702. X#include    <xview/xview.h>
  703. X#include    <xview/panel.h>
  704. X#include    <xview/rect.h>
  705. X#include    <xview/screen.h>
  706. X
  707. X#include    "manifest.h"
  708. X#include    "contool.h"
  709. X#include    "contool_ui.h"
  710. X
  711. XEXPORT    Props    defaults = {3,        /* beeps             */
  712. X                TRUE,    /* flash the icon         */
  713. X                FALSE,    /* don't pop the window         */
  714. X                TRUE,    /* timestamp the message     */
  715. X                NULL,    /* no command to run         */
  716. X                NULL,    /* default good icon         */
  717. X                NULL,    /* default bad icon         */
  718. X                NULL,    /* default flash icon         */
  719. X                "lpr",    /* default print filter         */
  720. X                NULL,    /* no log file             */
  721. X                TRUE,    /* log after filtering         */
  722. X                60,        /* timestamp every 60 seconds     */
  723. X                32768,    /* save 32K of messages         */
  724. X                1024    /* remove 1K when we get full     */
  725. X               };
  726. X
  727. XPRIVATE    contool_props_objects    *contool_props = NULL;
  728. X
  729. X/************************************************************************/
  730. XPRIVATE    init_props(ip)
  731. X
  732. Xcontool_props_objects    *ip;
  733. X
  734. X{    int    val;
  735. X
  736. X    val = 0;
  737. X    if (defaults.beep > 0)
  738. X       val |= BEEP_BIT;
  739. X    if (defaults.command > 0)
  740. X       val |= COMMAND_BIT;
  741. X    if (defaults.flash)
  742. X       val |= FLASH_BIT;
  743. X    if (defaults.open)
  744. X       val |= OPEN_BIT;
  745. X    if (defaults.stamp > 0)
  746. X       val |= STAMP_BIT;
  747. X    xv_set(ip->default_action,     PANEL_VALUE,    val,                       NULL);
  748. X    xv_set(ip->default_beep_count, PANEL_VALUE,    defaults.beep,
  749. X                       PANEL_INACTIVE, defaults.beep == 0,        NULL);
  750. X    xv_set(ip->default_beep_times, PANEL_INACTIVE, defaults.beep == 0,        NULL);
  751. X    xv_set(ip->default_command,    PANEL_VALUE,    is_null(defaults.command),
  752. X                       PANEL_INACTIVE, defaults.command == NULL,  NULL);
  753. X    xv_set(ip->log_file,           PANEL_VALUE,    defaults.log_file,         NULL);
  754. X    xv_set(ip->log_style,          PANEL_VALUE,    defaults.log_after,        NULL);
  755. X    xv_set(ip->good_icon,          PANEL_VALUE,    defaults.good_icon,        NULL);
  756. X    xv_set(ip->bad_icon,           PANEL_VALUE,    defaults.bad_icon,         NULL);
  757. X    xv_set(ip->flash_icon,         PANEL_VALUE,    defaults.flash_icon,       NULL);
  758. X    xv_set(ip->print_filter,       PANEL_VALUE,    defaults.print_filter,     NULL);
  759. X    xv_set(ip->max_message,        PANEL_VALUE,    defaults.max_size,         NULL);
  760. X    xv_set(ip->stamp_resolution,   PANEL_VALUE,    defaults.stamp_resolution, NULL);
  761. X    xv_set(ip->delete_amount,      PANEL_VALUE,    defaults.delete_amount,    NULL);
  762. X}
  763. X
  764. X/************************************************************************/
  765. XEXPORT    Menu_item    edit_properties(item, op)
  766. X
  767. XMenu_item    item;
  768. XMenu_generate    op;
  769. X
  770. X{    contool_base_objects    *ip = (contool_base_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  771. X
  772. X    if (op == MENU_NOTIFY) {
  773. X       xv_set(ip->base, FRAME_BUSY, TRUE, NULL);
  774. X       if (contool_props == NULL) {
  775. X          contool_props = contool_props_objects_initialize(NULL, ip->base);
  776. X          xv_set(contool_props->log_file,
  777. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  778. X                      PANEL_NOTIFY_STRING, "\n\r ",
  779. X                   NULL);
  780. X          xv_set(contool_props->good_icon,
  781. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  782. X                      PANEL_NOTIFY_STRING, "\n\r ",
  783. X                   NULL);
  784. X          xv_set(contool_props->bad_icon,
  785. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  786. X                      PANEL_NOTIFY_STRING, "\n\r ",
  787. X                   NULL);
  788. X          xv_set(contool_props->flash_icon,
  789. X                      PANEL_NOTIFY_LEVEL, PANEL_SPECIFIED,
  790. X                      PANEL_NOTIFY_STRING, "\n\r ",
  791. X                   NULL);
  792. X          place_dialog(ip->base, contool_props->props);
  793. X          }
  794. X       init_props(contool_props);
  795. X       xv_set(contool_props->props, XV_SHOW, TRUE, NULL);
  796. X       xv_set(ip->base, FRAME_BUSY, FALSE, NULL);
  797. X       }
  798. X    return item;
  799. X}
  800. X
  801. X/************************************************************************/
  802. XEXPORT    void    default_action(item, value, event)
  803. X
  804. XPanel_item    item;
  805. Xunsigned int    value;
  806. XEvent        *event;
  807. X
  808. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  809. X    
  810. X    xv_set(ip->default_beep_count, PANEL_INACTIVE, !(value & BEEP_BIT), NULL);
  811. X    xv_set(ip->default_beep_times, PANEL_INACTIVE, !(value & BEEP_BIT), NULL);
  812. X    xv_set(ip->default_command,    PANEL_INACTIVE, !(value & COMMAND_BIT), NULL);
  813. X}
  814. X
  815. X/************************************************************************/
  816. XEXPORT    void    accept_properties(item, event)
  817. X
  818. XPanel_item    item;
  819. XEvent        *event;
  820. X
  821. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  822. X    Props    new;
  823. X    int    val;
  824. X    Server_image    icon = NULL, load_icon();
  825. X    char    msg[1024];
  826. X
  827. X    val = (int) xv_get(ip->default_action, PANEL_VALUE);
  828. X
  829. X    if (val & BEEP_BIT)
  830. X       new.beep = (int) xv_get(ip->default_beep_count, PANEL_VALUE);
  831. X    else
  832. X       new.beep = 0;
  833. X
  834. X    if (val & COMMAND_BIT) {
  835. X       new.command = (char *) xv_get(ip->default_command, PANEL_VALUE);
  836. X       if (is_empty(new.command)) {
  837. X          error("You must specify a command to be executed");
  838. X          xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  839. X          return;
  840. X          }
  841. X       }
  842. X    else
  843. X       new.command = NULL;
  844. X
  845. X    new.flash            = (val & FLASH_BIT)? TRUE : FALSE;
  846. X    new.open             = (val & OPEN_BIT)? TRUE : FALSE;
  847. X    new.stamp            = (val & STAMP_BIT)? TRUE : FALSE;
  848. X    new.log_file         = (char *) xv_get(ip->log_file,         PANEL_VALUE);
  849. X    new.log_after        = (int)    xv_get(ip->log_style,        PANEL_VALUE);
  850. X    new.good_icon        = (char *) xv_get(ip->good_icon,        PANEL_VALUE);
  851. X    new.bad_icon         = (char *) xv_get(ip->bad_icon,         PANEL_VALUE);
  852. X    new.flash_icon       = (char *) xv_get(ip->flash_icon,       PANEL_VALUE);
  853. X    new.print_filter     = (char *) xv_get(ip->print_filter,     PANEL_VALUE);
  854. X    new.max_size         = (int)    xv_get(ip->max_message,      PANEL_VALUE);
  855. X    new.stamp_resolution = (int)    xv_get(ip->stamp_resolution, PANEL_VALUE);
  856. X    new.delete_amount    = (int)    xv_get(ip->delete_amount,    PANEL_VALUE);
  857. X
  858. X    new.good_icon = is_empty(new.good_icon)? NULL : expand_tilde(new.good_icon);
  859. X    new.bad_icon = is_empty(new.bad_icon)? NULL : expand_tilde(new.bad_icon);
  860. X    new.flash_icon = is_empty(new.flash_icon)? NULL : expand_tilde(new.flash_icon);
  861. X
  862. X    if (new.good_icon && (icon = load_icon(new.good_icon, msg)) == NULL) {
  863. X       error("Invalid \"All is well\" icon: %s", msg);
  864. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  865. X       return;
  866. X       }
  867. X    if (icon)
  868. X       xv_destroy(icon);
  869. X    if (new.bad_icon && (icon = load_icon(new.bad_icon, msg)) == NULL) {
  870. X       error("Invalid \"Check console\" icon: %s", msg);
  871. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  872. X       return;
  873. X       }
  874. X    if (icon)
  875. X       xv_destroy(icon);
  876. X    if (new.flash_icon && (icon = load_icon(new.flash_icon, msg)) == NULL) {
  877. X       error("Invalid \"Flash\" icon: %s", msg);
  878. X       xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  879. X       return;
  880. X       }
  881. X    if (icon)
  882. X       xv_destroy(icon);
  883. X
  884. X    new.log_file = is_empty(new.log_file)? NULL : expand_tilde(new.log_file);
  885. X    new.print_filter = strsave(new.print_filter);
  886. X    new.command = strsave(defaults.command);
  887. X    defaults = new;
  888. X
  889. X    update_icons();
  890. X    update_logging();
  891. X}
  892. X
  893. X/************************************************************************/
  894. XEXPORT    void    reset_properties(item, event)
  895. X
  896. XPanel_item    item;
  897. XEvent        *event;
  898. X
  899. X{    contool_props_objects    *ip = (contool_props_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
  900. X    
  901. X    init_props(ip);
  902. X    xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
  903. X}
  904. END_OF_FILE
  905. if test 8606 -ne `wc -c <'props.c'`; then
  906.     echo shar: \"'props.c'\" unpacked with wrong size!
  907. fi
  908. # end of 'props.c'
  909. fi
  910. echo shar: End of archive 3 \(of 6\).
  911. cp /dev/null ark3isdone
  912. MISSING=""
  913. for I in 1 2 3 4 5 6 ; do
  914.     if test ! -f ark${I}isdone ; then
  915.     MISSING="${MISSING} ${I}"
  916.     fi
  917. done
  918. if test "${MISSING}" = "" ; then
  919.     echo You have unpacked all 6 archives.
  920.     rm -f ark[1-9]isdone
  921. else
  922.     echo You still need to unpack the following archives:
  923.     echo "        " ${MISSING}
  924. fi
  925. ##  End of shell archive.
  926. exit 0
  927.  
  928. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  929. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  930. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  931. Melbourne, FL 32902            FAX   : (407) 729-2537
  932.  
  933. A good newspaper is never good enough,
  934.     but a lousy newspaper is a joy forever.        -- Garrison Keillor
  935.  
  936. dan
  937. ----------------------------------------------------
  938. O'Reilly && Associates   argv@sun.com / argv@ora.com
  939. Opinions expressed reflect those of the author only.
  940.